#ifndef TESTER_H
#define TESTER_H

#include <QWidget>
#include <QTimer>
#include "msgsocket.h"

namespace Ui {
class Tester;
}

class Tester : public QWidget
{
    Q_OBJECT

public slots:
    void slotAutoConnectTimer(void);
    void slotAutoDisconnectTimer(void);
    void slotAutoSendMsgTimer(void);
    void slotUpdateDisplayTimer(void);

public:
    explicit Tester(QWidget *parent = 0);
    ~Tester();

private slots:
    void on_pb_connect_clicked();
    void on_pb_disconnect_clicked();
    void on_pb_sendMsg_clicked();
    void on_pb_autoTest_clicked();

private:
    Ui::Tester *ui;

    QString m_msg;

    QTimer *m_autoConnectTimer;
    QTimer *m_autoDisconnectTimer;
    QTimer *m_autoSendMsgTimer;
    QTimer *m_updateDisplayTimer;

    QList<int> m_currentResTimeList;
    QList<QString> m_uIdList;
    MsgSocketMap m_socketMap;
};

#endif // TESTER_H
